import { defineStore } from 'pinia'
export const useStore = defineStore('storeId', {
    state: () => {
        return {
            add: 0,
            reduce: 100
        }
    },
    getters: {},
    actions: {
        increase() {
            this.add++
        },
        decrease() {
            this.reduce--
        }
    },
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'storeId',
                storage: localStorage,
                // 刷新浏览器 只保留 add
                paths: ['add']
            }
        ]
    }

})
